package com.quick.controller;

import com.quick.domain.Mail;
import com.quick.domain.MailQueue;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName MailController
 * @Description TODO
 * @Author Wangxin
 * @Date 2019-03-02 21:50
 * @Version 1.0
 **/
@RestController
@RequestMapping("/mail")
public class MailController {

    @RequestMapping("/test")
    public String sendMail() throws Exception{
        Mail mail = new Mail();
        mail.setTo("491946880@qq.com");
        mail.setSubject("ttt");
        mail.setContent("sssss");
        mail.setTemplate("notify.ftl");
        mail.setMessageStatus("400");
        mail.setCause("错误");
        mail.setMessageCode("400");
        MailQueue.getInstance().put(mail);
        MailQueue.getInstance().put(mail);
        return "666";
    }
}
